<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>

    <script type="text/javascript" src="../lib/jquery.js"></script>
    <script type="text/javascript">
        var books = null;
        $.get('http://www.liulongbin.top:3006/api/getbooks', function(res) {
            books = res.data
            console.log(books)
        })
        console.log(books);
        //Ajax发送的请求是异步请求
        //Ajax发送的请求只能在回调函数中查看
    </script>
</body>

</html>